/**
 * Created by zongjuan.wang on 2016/6/29.
 */

$(document).ready(function(){
    var headImg=new Array("head01.jpg","head02.jpg","head03.jpg");
    var uName=new Array("时尚伊人","六月奇迹","松松");
    $("#send").click(function(){
        if ($(".chatText").val()!=""){
            var j=Math.floor(Math.random()*3);
            var str="<section>";
            str+="<div><img src=\"images/"+headImg[j]+"\"></div>";
            str+="<p>"+uName[j]+"</p><div class=\"chatContent\">"+$(".chatText").val();
            str+="</div>";
            str+="</section>";
            $(".chatBody").html( $(".chatBody").html()+str);
        }
    });
})

